Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YieldbotBidAdapter ad markup to use implicit document open via write #3313

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

elljoh
Copy link
Contributor

@elljoh elljoh commented Nov 20, 2018

Type of change

  • Refactoring (no functional changes, no api changes)

Description of change

Changes the adapter internal ad markup to remove an explicit call to document.open() on the rendering frame contentDocument in preference to the implicit "open()" steps taken by the user-agent as part of a call to document.write() when a Document is not already open for writing.

Reasoning for the change

Observations in production deployments have shown cases where the write() function of ad markup content Document instance is redefined to equal a function defined on the respective contentWindow; therefore, when the associated contentDocument is open() 'ed, in most user-agents the contentWindow globals and events will be removed.

The result being that the creative markup related to this PR would fail due to a call to an undefined function.

The contentDocument "core" function redefinitions observed were not cases of malicious code; rather, ad quality tooling deployed or implemented by media owners.

@elljoh elljoh changed the title YieldbotBidAdapter to use implicit document open via write YieldbotBidAdapter ad markup to use implicit document open via write Nov 20, 2018
@mkendall07 mkendall07 merged commit aed272f into prebid:master Nov 21, 2018
pedrolopezmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants